home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / utils / kp_overs.lzh / KP_OVERS / KP_OVERS.TXT next >
Text File  |  1991-05-19  |  5KB  |  110 lines

  1. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
  2. THIS DON'T IN ANY WAY REPLACE THE ORIGINAL OVERSCAN RELEASE. PLEASE-_
  3. READ THE ORIGINAL BEFORE THIS!!!_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
  4. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
  5.  
  6. This version of the Overscan software, is written by Klaus Pedersen
  7. (micro@imada.ou.dk). Thanks to 
  8.  
  9.        Bernd Gebauer and Karsten Isakovic, Berlin
  10.  
  11. for the original. I don't in any way take any credit or blame for
  12. this (but bug reports are welcome). If the original writers are 
  13. pissed, I will do mine to make it good again...
  14.  
  15.  
  16. What then have been fixed?
  17.    o a bug that ment that some programs wrote one pixel outside
  18.      the screen, have been fixed.
  19.    o the software is 68010/20/30/40 clean. (see techincal bits)
  20.    o the software works on TOS 1.4 and __later__! (it don't use
  21.      undocumented system variables to enlarge the screen memory
  22.      any more!)
  23.    o it is now possible to disable Overscan, from within a bad
  24.      program (last resort, as it is not possible to tell accs
  25.      and the AES about the new screen size).
  26.    o it is also possible to enable/disable Overscan form the
  27.      desktop (general, because it is possible to init. AES and
  28.      accs).
  29.    o the driver is now 3700 bytes, of which 3000 stays in memory,
  30.      (not counting the larger screen (68Kb)).
  31.  
  32.  
  33. I have added a new menu to the the Setup menu. Press UNDO and the
  34. software asks you to filp the overscan switch. When you have done
  35. that, the software makes the nesseary changes and returns.
  36. It is possible to call the Setup menu from the Set Pref. menu and
  37. change back to Overscan! (this might not work on new TOSes as it
  38. depends on a strange feature in the Desktop!)
  39.  
  40.  
  41. The CLEANUP switch (ALT-[R-SHIFT]-HELP) now checks if the Overscan
  42. switch is active or not, and make the nessary changes! This is a 
  43. last resort to run bad programs, because it is not possible to tell
  44. accs and the AES about the new screen size.
  45.  
  46.  
  47. TECHINCAL BITS
  48. - move SR,Dx - have been removed, the instruction was used to 
  49.   check if the CPU was in USER or SUPER mode!!! The instruction
  50.   can be used to that on all 680x0 cpus, but cpu's later than
  51.   the 68000 tells you with a PRIVILEGE VIALTION exception, if
  52.   the CPU was in USER mode.
  53.   
  54. - the offsets to parameters from within the TOS dispatchers have
  55.   been fixed so that it works on all 680x0 CPUs. This is how you
  56.   should link into the GEMDOS trap:
  57.  
  58. - remember that GEMDOS, XBIOS, BIOS is documented to change
  59.   D0-D2/A0-A2, this means that you should be able to use them too,
  60.   If is wasn't for TurboC and many other applications, that consider
  61.   A2 safe! (use as few registers as possible and don't use D3-D7/
  62.   A2-A7)!
  63.   AES and the VDI are special! Here you can't even A0 and A1 and
  64.   D0 and D1 is used to pass parameters! (Save all registers!)
  65.  
  66.    LINK INTO GEMDOS
  67. =====================  
  68. longframe       EQU $059E
  69.  
  70.                 DC.B "XBRAnnnn" ; This is all XBRA is about
  71. OldDos:         DC.L 0          ; place the old address here!
  72. MyDos:          move    USP,A0
  73.                 btst    #5,(SP)      ; called from Supervisor- or User-mode?
  74.                 beq.s   tst_funcs    ; Parameter is on USER stack
  75.                 lea     6(SP),A0     ; Old (small) stack frame.
  76.                 tst.w   longframe.w  ; Is this running on a CPU
  77.                 beq.s   tst_funcs    ; with a long stackframe?
  78.                 addq.w  #2,A0        ;    -then add 2 more bytes.
  79. tst_funcs:      cmpi.w  #Pterm0,(A0) ; Check the FUNCTION numbers!
  80.                 bne.s   notmine
  81.  
  82. ... here do the stuff you need to do ...
  83.                 
  84. notmine:        movea.l OldDos(PC),A0 ; Now return to the original!
  85.                 jmp     (A0)
  86.  
  87.  
  88.    LINK INTO VDI/AES
  89. ======================
  90. magicAES        EQU  200
  91. magicVDI        EQU  115
  92.  
  93.                 DC.B "XBRAnnnn"
  94. OldVec:         DC.L 0
  95. MyGem:          cmpi.w  #magicVDI,D0    ; Is it a [VDI]-call ?
  96.                 bne.s   NotMyGem1       ;   no -> continue
  97.                 movem.l A0-A1,-(SP)     ; preserve all A-Regs!
  98.                 movea.l D1,A1           ; Address of VDI-Parameters
  99.                 movea.l (A1)+,A0        ; Control[0] = function number
  100.                 cmpi.w  #func,(A0)      ; Check the FUNCTION numbers!
  101.                 bne.s   NotMyGem        ;    not mine -> next; 
  102.  
  103. ... here do the stuff you need to do ...
  104.  
  105. NotMyGem:       movem.l (SP)+,A0-A1
  106. NotMyGem1:      move.l  OldVec(PC),-(SP) ; call Orginal GEM-dispatcher
  107.                 rts                     ; ... call
  108.  
  109.  
  110.